/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package prj;

import java.util.List;
import javax.ejb.EJB;
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebService;
import javax.ejb.Stateless;

/**
 *
 * @author ciro
 */
@WebService(serviceName = "ByNightWS")
@Stateless()
public class ByNightWS {
    @EJB
    private WebServiceBean ejbRef;
    // "Insert Code > Add Web Service Operation")

    @WebMethod(operationName = "login")
    public String login(@WebParam(name = "user") String user, @WebParam(name = "password") String password, @WebParam(name = "utente") String utente) {
        return ejbRef.login(user, password, utente);
    }

    @WebMethod(operationName = "visualizzaPrenotazioni")
    public List<String[]> visualizzaPrenotazioni(@WebParam(name = "locale") String locale) {
        return ejbRef.visualizzaPrenotazioni(locale);
    }

    @WebMethod(operationName = "cambiaStatoPrenotazione")
    public boolean cambiaStatoPrenotazione(@WebParam(name = "id") String id) {
        return ejbRef.cambiaStatoPrenotazione(id);
    }

    @WebMethod(operationName = "cerca")
    public List<String[]> cerca(@WebParam(name = "cerca") String cerca, @WebParam(name = "table") String table) {
        return ejbRef.cerca(cerca, table);
    }
    
}
